// 格式：XXXX年XX月XX日XX时XX分XX秒 星期X
const complement = function (value) {
  return value < 10 ? `0${value}` : value;
};
export const formateDate = (date) => {
  const time = new Date(date);
  const year = time.getFullYear();
  const month = complement(time.getMonth() + 1);
  const day = complement(time.getDate());
  return `${year}年${month}月${day}日`;
};
export const formateDate2 = (date) => {
  const time = new Date(date);
  const hour = complement(time.getHours());
  const minute = complement(time.getMinutes());
  const second = complement(time.getSeconds());
  return `${hour}:${minute}:${second}`;
};
